public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree=new TestBinaryTree();
        TestBinaryTree.TreeNode root=testBinaryTree.createNode();

        System.out.println("======前序遍历=====");
        testBinaryTree.preOrder(root);

        System.out.println();
        System.out.println("======中序遍历=====");
        testBinaryTree.inOrder(root);

        System.out.println();
        System.out.println("======后序遍历=====");
        testBinaryTree.postOrder(root);

        System.out.println();
        System.out.println("=======树中节点个数=====");
        System.out.println(testBinaryTree.size(root));

        testBinaryTree.size2(root);
        System.out.println(TestBinaryTree.nodeSize);

        System.out.println();
        System.out.println("======叶子节点个数======");
        System.out.println(testBinaryTree.getLeafNodeCount(root));

        testBinaryTree.getLeafNodeCount2(root);
        System.out.println(TestBinaryTree.leafNodeCount);

        System.out.println();
        System.out.println("=======树中第k层节点个数=====");
        System.out.println(testBinaryTree.getKLevelNodeCount(root, 3));

        System.out.println();
        System.out.println("=======树的最大高度=====");
        System.out.println(testBinaryTree.getHeight(root));

        System.out.println();
        System.out.println("=======找到指定值所在的节点=====");
        System.out.println(testBinaryTree.find(root, 'A').val);
    }
}
